package com.helloUIBinder.client.events;

import com.google.gwt.event.shared.GwtEvent;
import com.helloUIBinder.model.BlogPost;

public class OnAdminBlogPostCreateResultEvent extends GwtEvent<OnAdminBlogPostCreateResultHandler> {
    public static GwtEvent.Type<OnAdminBlogPostCreateResultHandler> TYPE = new GwtEvent.Type<OnAdminBlogPostCreateResultHandler>();

    public final static String CREATE = "CREATE";
    public final static String CANCEL = "CANCEL";

    private String result = "";

    private BlogPost resultBlogPost;

    @Override
    public GwtEvent.Type<OnAdminBlogPostCreateResultHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(OnAdminBlogPostCreateResultHandler handler) {
        handler.result(this);
    }

    public String getResult() {
        return result;
    }

    public BlogPost getResultBlogPost() {
        return resultBlogPost;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public void setResultBlogPost(BlogPost resultBlogPost) {
        this.resultBlogPost = resultBlogPost;
    }
}
